// pages/set_up/invite_friends.js
var that
var app = getApp()
Page({
  data: {
  code:'',
  num:0
  },
  onLoad: function (options) {
  that=this;
  this.setData({ code: options.code, num: options.num})
  },
  onReady: function () {
  
  },
  onShow: function () {
  
  },
//分享
  onShareAppMessage: function (ress) {
    if (ress.from === 'button') {
      // 来自页面内转发按钮
      // console.log(ress.target)
      return {
        title: '自定义转发标题',
        path: '/pages/member/invite?code=' + that.data.code +'&f='+ app.globalData.userInfo.nickname,
        success: function (res) {
          // 转发成功
        },
        fail: function (res) {
          // 转发失败
        }
      }
    }
  },
  share:function(){
    return {
      title: '自定义分享标题',
      desc: '自定义分享描述',
      path: '/page/member/invite'
    }
  }

})